﻿using System;

namespace ConsoleApp1
{
    class Class1
    {
        //字段
        public String name;
        public int age;
        public char sex;
        //属性
        public String Name
        {
            get
            { return this.name; }
            set
            { this.name = value; }
        }
        public int Age
        {
            get
            { return this.age; }
            set
            { this.age = value; }
        }
        public char Sex
        {
            get
            { return this.sex; }
            set
            { this.sex = value; }
        }

        public void Ss()
        {
            Console.WriteLine("姓名:{0}年纪:{1}性别:{2}", this.name, this.age, this.sex);

        }
    }
}




